package com.tz.zczc.domain.model.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @ClassName: Keywords
* @Description: keywords表对应的java bean类
* @author: yishui zhiyubujian@163.com
 */
@Table(name = "keywords")
public class Keywords implements Serializable {
    /**
     * @Fields keywords.id :
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "select uuid()")
    private String id;

    /**
     * 搜索的关键词
     */
    /**
     * @Fields keywords.key_word :搜索的关键词
     */
    @Column(name = "key_word")
    private String keyWord;

    /**
     * 频率
     */
    /**
     * @Fields keywords.frequency :频率
     */
    private Integer frequency;

    /**
     * 搜索结果
     */
    /**
     * @Fields keywords.result :搜索结果
     */
    private Integer result;

    /**
     * 最后搜索时间
     */
    /**
     * @Fields keywords.search_time :最后搜索时间
     */
    @Column(name = "search_time")
    private Date searchTime;

    /**
     * 逻辑删除
     */
    /**
     * @Fields keywords.deleted :逻辑删除
     */
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    /**
     * @return keywords.id : 返回 
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    /**
     * @param id of keywords : 设置 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取搜索的关键词
     *
     * @return key_word - 搜索的关键词
     */
    /**
     * @return keywords.key_word : 返回 搜索的关键词
     */
    public String getKeyWord() {
        return keyWord;
    }

    /**
     * 设置搜索的关键词
     *
     * @param keyWord 搜索的关键词
     */
    /**
     * @param keyWord of keywords : 设置 搜索的关键词
     */
    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    /**
     * 获取频率
     *
     * @return frequency - 频率
     */
    /**
     * @return keywords.frequency : 返回 频率
     */
    public Integer getFrequency() {
        return frequency;
    }

    /**
     * 设置频率
     *
     * @param frequency 频率
     */
    /**
     * @param frequency of keywords : 设置 频率
     */
    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    /**
     * 获取搜索结果
     *
     * @return result - 搜索结果
     */
    /**
     * @return keywords.result : 返回 搜索结果
     */
    public Integer getResult() {
        return result;
    }

    /**
     * 设置搜索结果
     *
     * @param result 搜索结果
     */
    /**
     * @param result of keywords : 设置 搜索结果
     */
    public void setResult(Integer result) {
        this.result = result;
    }

    /**
     * 获取最后搜索时间
     *
     * @return search_time - 最后搜索时间
     */
    /**
     * @return keywords.search_time : 返回 最后搜索时间
     */
    public Date getSearchTime() {
        return searchTime;
    }

    /**
     * 设置最后搜索时间
     *
     * @param searchTime 最后搜索时间
     */
    /**
     * @param searchTime of keywords : 设置 最后搜索时间
     */
    public void setSearchTime(Date searchTime) {
        this.searchTime = searchTime;
    }

    /**
     * 获取逻辑删除
     *
     * @return deleted - 逻辑删除
     */
    /**
     * @return keywords.deleted : 返回 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置逻辑删除
     *
     * @param deleted 逻辑删除
     */
    /**
     * @param deleted of keywords : 设置 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", keyWord=").append(keyWord);
        sb.append(", frequency=").append(frequency);
        sb.append(", result=").append(result);
        sb.append(", searchTime=").append(searchTime);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Keywords other = (Keywords) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getKeyWord() == null ? other.getKeyWord() == null : this.getKeyWord().equals(other.getKeyWord()))
            && (this.getFrequency() == null ? other.getFrequency() == null : this.getFrequency().equals(other.getFrequency()))
            && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()))
            && (this.getSearchTime() == null ? other.getSearchTime() == null : this.getSearchTime().equals(other.getSearchTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getKeyWord() == null) ? 0 : getKeyWord().hashCode());
        result = prime * result + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
        result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
        result = prime * result + ((getSearchTime() == null) ? 0 : getSearchTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}